<template>
	<view>
		<view>
		    <view class="pinpai-head">{{gongsiInfo.name}}</view>
			<view class="wrap">
				<u-swiper :list="lunboImg" height="1000rpx"></u-swiper>
			</view>
		    <view class="jieshao-box">
		        <view class="tips">品牌介绍</view>
				<view class="jieshao">
					<mp-html :content="gongsiInfo.pinpaiIntroduction" />
				</view>
		    </view>
		    <view class="jieshao-box">
		        <view class="tips">品牌故事</view>
				<view class="gushi">
					<mp-html :content="gongsiInfo.pinpaiStory" />
				</view>
		    </view>
		    <view class="jieshao-box">
		        <view class="tips">品牌定位</view>
		        <view class="dingwei">
					<mp-html :content="gongsiInfo.pinpaiDingwei" />
				</view>
		    </view>
		    <view class="jieshao-box">
		        <view class="tips">品牌愿景</view>
				<view class="yuanjing">
					<mp-html :content="gongsiInfo.pinpaiDevelopment" />
				</view>
		    </view>
		    <view class="telphoneview">
				<span style="color: red">投诉与建议:</span>
				<span class="telphone">{{gongsiInfo.tousuPhone}}</span>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				gsId:'',		//品牌公司ID
				gongsiInfo:'',	//公司信息
				rawList:[],		//轮播图原始数据
			}
		},
		onLoad(opt) {
			this.gsId = opt.gsId;
			this.getPpgsInfo()
		},
		methods: {
			getPpgsInfo(){
				this.$http.get('/xllmppGongsi/getGongsiById',{
					gsid:this.gsId
				}).then(res => {
					console.log(res.data)
					if(res.data.code==200){
						this.gongsiInfo = res.data.data
						this.rawList = res.data.data.ppLunbotus
					}else{
						this.$u.toast(res.data.msg)
					}
				})
			}
		},
		computed:{
			lunboImg(){
				let tu=[	];
				for(let i=0;i<this.rawList.length;i++){
					let obj = {	};
					obj.image=this.host+'/image/ppLunbotu/'+this.rawList[i].images;
					obj.title=this.rawList[i].title;
					tu.push(obj);
				}
				return tu;
			},
		}
	}
</script>

<style>
	.jieshao,.gushi,.dingwei,.yuanjing{
		font-size: 10px;
	}
	.pinpai-head{
		text-align: center;
		font-size: 17px;
		padding: 10rpx 0 10rpx 0;
	}
	.jieshao-box{
		background-color: white;
		margin-bottom: 10px;
		padding: 10px;
	}
	.tips{
		margin-bottom: 10px;
		font-size: 17px;
	}
	img{
		/*width: 100%;*/
		max-width: 100%;
	}
	.telphoneview{
		text-align: left;
		margin-left : 5px;
		font-size: 17px;
	}
</style>
